﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PRO.Entity;
using PRO.DbProvider;

namespace PRO.Product
{
    public class FavoriteLib
    {
        /// <summary>
        /// 添加到收藏夹
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public static int AddToFavorite(FavoriteInfo info)
        {
            return DataBaseProvider.GetInstance().AddToFavorite(info);
        }

        /// <summary>
        /// 从收藏夹删除
        /// </summary>
        /// <param name="id"></param>
        /// <param name="userid"></param>
        /// <returns></returns>
        public static bool DelToFavorite(int id, int userid)
        {
            if (id > 0 && userid > 0)
            {
                return DataBaseProvider.GetInstance().DelToFavorite(id, userid);
            }
            else
                return false;
        }
    }
}
